
CC := gcc -c
CXX := g++ -c
LD := g++

CFLAGS += \
    -O0 -g -Wall -fmessage-length=0

CXXFLAGS += \
    -O0 -g -Wall -fmessage-length=0

LDFLAGS += \

OBJS =	$(patsubst %.c,%.c.o,$(wildcard *.c)) \
        $(patsubst %.cpp,%.cpp.o,$(wildcard *.cpp))

TARGET := tftp-server

all:$(TARGET)

$(TARGET): $(OBJS)
	$(LD) $(OBJS) $(LDFLAGS) -o $(TARGET)

%.c.o: %.c
	$(CC) $(CFLAGS) $< $(OUTPUT_OPTION)

%.cpp.o: %.cpp
	$(CXX) $(CXXFLAGS) $< $(OUTPUT_OPTION)

clean:
	rm -f $(OBJS) $(TARGET)
